package net.zjitc.utils;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import sun.management.jmxremote.ConnectorBootstrap;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * Created by Administrator on 2017/9/18.
 */
public  class  C3P0Utils {
    public static ComboPooledDataSource ds=null;
    static {
        ds=new ComboPooledDataSource();
    }
    public static  Connection getConneciton() throws SQLException {
        return ds.getConnection();
    }
  public static DataSource getDataSourse(){
  return ds;
  }
}

